<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>

	<script type="text/javascript">
str = "bbs.daniuit.com，论坛地址： bbs.daniuit.com, 官方网址： www.daniuit.com";

	tempArr = [];

	while(str.indexOf('daniuit')!="-1"){
		tempArr.push(str.indexOf('daniuit'));
		str = str.replace('daniuit','xxxxxxx');
	}

	document.write(tempArr);
	document.write(str);


	</script>
</head>
<body>


	
</body>
</html>